package com.rice.riceaiagent.demo.invoke;

import dev.langchain4j.community.model.dashscope.QwenChatModel;
import dev.langchain4j.model.chat.ChatLanguageModel;
import lombok.extern.slf4j.Slf4j;

/**
 * 通过langchain4j 框架调用
 * @author ricejson
 */
@Slf4j
public class LangChain4jAIInvoke {
    public static void main(String[] args) {
        ChatLanguageModel chatModel = QwenChatModel.builder()
                .apiKey("")
                .modelName("qwen-plus")
                .build();
        String resp = chatModel.chat("你好，我是米饭好好吃");
        System.out.println(resp);
    }
}
